using System.Collections.Generic;

public class Table_GuideVOItem
{
    /// <summary>
    /// 唯一ID
    /// <summary>
    public int Id { get; private set; }
    /// <summary>
    /// 功能点类型
    /// <summary>
    public int FunType { get; private set; }
    /// <summary>
    /// 优先级
    /// <summary>
    public int Priority { get; private set; }
    /// <summary>
    /// 延时触发
    /// <summary>
    public int DelayTime { get; private set; }
    /// <summary>
    /// 触发等级
    /// <summary>
    public int UserLv { get; private set; }
    /// <summary>
    /// 判断组ID
    /// <summary>
    public bool CheckGroupId { get; private set; }
    /// <summary>
    /// 判断标记
    /// <summary>
    public bool JudgeTag { get; private set; }
    /// <summary>
    /// 组ID
    /// <summary>
    public int GroupId { get; private set; }
    /// <summary>
    /// 前置组ID
    /// <summary>
    public int PreGroupId { get; private set; }
    /// <summary>
    /// 前置引导ID
    /// <summary>
    public int PreId { get; private set; }
    /// <summary>
    /// 后置引导ID
    /// <summary>
    public int NextId { get; private set; }
    /// <summary>
    /// 完成标记
    /// <summary>
    public bool Finish { get; private set; }
    /// <summary>
    /// 完成任务ID
    /// <summary>
    public int TaskId { get; private set; }
    /// <summary>
    /// 打开UIID
    /// <summary>
    public int OpenUId { get; private set; }
    /// <summary>
    /// 关闭UIID
    /// <summary>
    public int CloseUId { get; private set; }
    /// <summary>
    /// 通关副本ID
    /// <summary>
    public int WinFBId { get; private set; }
    /// <summary>
    /// 进入副本ID
    /// <summary>
    public int EnterFBId { get; private set; }
    /// <summary>
    /// 道具ID
    /// <summary>
    public int ItemId { get; private set; }
    /// <summary>
    /// 道具数量
    /// <summary>
    public int ItemCount { get; private set; }
    /// <summary>
    /// 装备类型
    /// <summary>
    public int EquipType { get; private set; }
    /// <summary>
    /// 装备数量
    /// <summary>
    public int EquipNum { get; private set; }
    /// <summary>
    /// 是否暂停副本
    /// <summary>
    public bool IsPause { get; private set; }
    /// <summary>
    /// 新手关用
    /// <summary>
    public bool IsNewGuideUse { get; private set; }
    /// <summary>
    /// 界面ID
    /// <summary>
    public int GotoUId { get; private set; }
    /// <summary>
    /// 共存UIID
    /// <summary>
    public int GetOpenUICount() { return OpenUI.Count; }
    private List<int> OpenUI = new List<int>();
    public int GetOpenUIbyIndex(int idx)
    {
        return OpenUI.GetValueByIdx(idx, 0);
    }
    /// <summary>
    /// 资源路径
    /// <summary>
    public string Resources { get; private set; }
    /// <summary>
    /// 对象路径
    /// <summary>
    public string GoPath { get; private set; }
    /// <summary>
    /// 功能点参数
    /// <summary>
    public string FunParam { get; private set; }

    public Table_GuideVOItem(ExcelLineReader reader)
    {
        Id = reader.ReadInt();
        FunType = reader.ReadInt();
        Priority = reader.ReadInt();
        DelayTime = reader.ReadInt();
        UserLv = reader.ReadInt();
        CheckGroupId = reader.ReadBool();
        JudgeTag = reader.ReadBool();
        GroupId = reader.ReadInt();
        PreGroupId = reader.ReadInt();
        PreId = reader.ReadInt();
        NextId = reader.ReadInt();
        Finish = reader.ReadBool();
        TaskId = reader.ReadInt();
        OpenUId = reader.ReadInt();
        CloseUId = reader.ReadInt();
        WinFBId = reader.ReadInt();
        EnterFBId = reader.ReadInt();
        ItemId = reader.ReadInt();
        ItemCount = reader.ReadInt();
        EquipType = reader.ReadInt();
        EquipNum = reader.ReadInt();
        IsPause = reader.ReadBool();
        IsNewGuideUse = reader.ReadBool();
        GotoUId = reader.ReadInt();
        OpenUI = reader.ReadShortString().ToIntList(";");
        Resources = reader.ReadString();
        GoPath = reader.ReadString();
        FunParam = reader.ReadString();
    }
}

public class Table_GuideVOMgr : IDataMgr
{
    protected override string FileName { get { return "Txt/GuideVO.txt"; } }

    protected List<Table_GuideVOItem> mItemList = new List<Table_GuideVOItem>();
    public Table_GuideVOItem GetItemByIdx(int idx)
    {
        return mItemList[idx];
    }
    public Table_GuideVOItem GetItemById(int id)
    {
        int idx = GetIdxById(id);
        return GetItemByIdx(idx);
    }

    public override void Load(ExcelLineReader reader)
    {
        var item = new Table_GuideVOItem(reader);
        mItemDic.Add(item.Id, mDataCount);
        mItemList.Add(item);
    }
}